<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
  <script src="../../../../perf-tester/perf.js"></script>
  <script src="../../node_modules/@webcomponents/webcomponentsjs/webcomponents-lite.js"></script>
  <script type="module" src="../../polymer-legacy.js"></script>
  <script type="module" src="../../lib/mixins/strict-binding-parser.js"></script>
</head>

<body>

<!--   <template>
    {{compute(alaksjflkasjflkasjflkasjlfkajslkfjaslkfjaaaaaaaaaaaaaaaaaaaaaaaa)]}
  </template>
 -->    <!-- {{compute(tricky, 'literal\,\'zot\'', this.has.long.log.lo)]} -->

  <template>
    <span>{{foo}}</span> <span>{{foo.bar}}</span> <span>{{foo.bar.zot}}</span>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
    tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
    quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
    consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
    cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
    proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    <span>{{compute(tricky, 'literal\,\'zot\'')}}</span>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
    tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
    quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
    consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
    cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
    proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    <span>{{compute(tricky, 'literal\,\'zot\'', this.has.a.bogus.ending.bracket)]}</span>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
    tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
    quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
    consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
    cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
    proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    <div class$="{{compute(a, b, c,d,e,f,g,h,i)}}">
      Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
      tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
      quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
      consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
      cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
      proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
      <span>{{bindings.and.stuff}}</span>
      <div id="zot"><span>[[computeFn(a, 'b', c, "d", 999)]]</span> literal <span>{{a.b}}</span> literally</div>
      <div id="zot"><span>[[computeFn(a, 'b', c, "d", 999)]]</span> literal <span>{{a.b}}</span> literally</div>
      <div id="zot"><span>[[computeFn(a, 'b', c, "d", 999)]]</span> literal <span>{{a.b}}</span> literally</div>
      <div id="zot"><span>[[computeFn(a, 'b', c, "d", 999)]]</span> literal <span>{{a.b}}</span> literally</div>
      <div id="zot"><span>[[computeFn(a, 'b', c, "d", 999)]]</span> literal <span>{{a.b}}</span> literally</div>
      <div id="zot"><span>[[computeFn(a, 'b', c, "d", 999)]]</span> literal <span>{{a.b}}</span> literally</div>
      <div id="zot"><span>[[computeFn(a, 'b', c, "d", 999)]]</span> literal <span>{{a.b}}</span> literally</div>
    </div>
  </template>

  <script type="module">
import { StrictBindingParser } from '../../lib/mixins/strict-binding-parser.js';
import { PolymerElement } from '../../polymer-element.js';
var COUNT = 1000;
var templates = [];
var template = document.querySelector('template');
for (var i=0; i<COUNT; i++) {
  templates[i] = template.cloneNode(true);
}
console.perf();
for (var i=0; i<COUNT; i++) {
  const klass = class Foo extends StrictBindingParser(PolymerElement) {
    static get _template() { return templates[i]; }
  };
  customElements.define('foo-' + i, klass);
  new klass();
}
console.perfEnd();
</script>

</body>
</html>
